package com.qf.springBeanLifecyleDemo.service.impl;

import com.qf.springBeanLifecyleDemo.dao.UserDao;
import com.qf.springBeanLifecyleDemo.entity.User;
import com.qf.springBeanLifecyleDemo.service.UserService;

/**
 * @author 刘欣
 * @createTime 2022/12/28 18:44
 * @description
 */
public class UserServiceImpl implements UserService {
    private UserDao userDao;

    @Override
    public User getUserService() {
        System.out.println("返回user对象");
        return userDao.getUser();
    }

    public void setUserDao(UserDao userDao) {
        System.out.println("userDaoSet依赖注入");
        this.userDao = userDao;
    }
    public void init() {
        System.out.println("UserServiceImpl对象初始化方法");
    }

    public void destroy() {
        System.out.println("UserServiceImpl对象销毁对象的方法");
    }

}
